﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="cn.kgc.pojo.News"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common/common.jsp" %>
<html>
	<head>
		<link href="<%=request.getContextPath() %>/css/common.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=request.getContextPath() %>/ckeditor/ckeditor.js"> </script>
	</head>
<body>
传递过来的新闻ID：${param.id}

<div class="main-content-right">
      
        <div class="main-text-box">
      		<div class="main-text-box-tbg">
                <div class="main-text-box-bbg">
                    <div class="article-box">
                    	<!--新闻的标题-->
                        <%
                            News news = newsService.getNewsListById(Integer.parseInt(request.getParameter("id")));
                            request.setAttribute("news",news);
                        %>
                        <h1><c:out value='${news.title}' escapeXml="true" /></h1>
                        <div class="source-bar">
                            发布者：${news.author}
                            分类：<%=newsCategoryService.getNewsCategoryById(news.getCategoryId()).getName()%>
                            更新时间：<fmt:formatDate value="${news.createDate}" pattern="yyyy-MM-dd" />
                        </div>
                        <div class="article-content">
                            <span class="article-summary">
                                <b>
                                    摘要：${news.summary}
                                </b>
                            </span>
                            <%
                                if (news.getPicPath()==null || "".equals(news.getPicPath())){
                            %>
                                新闻图片：暂无<br/>
                            <%}else{%>
                                <img src="<%=request.getContextPath()%>/upload/<%=news.getPicPath()%>"/>
                            <%}%>
                            ${news.content}
                         </div>
                    </div>
                </div>
            </div>
        </div>
        
    </div>
</body>
</html>